// 直播资源表

package dbModel

import "time"

type LiveResource struct {
	Id           string    `json:"id" gorm:"primary_key; column:id; type:varchar(255)"`
	AreaName     string    `json:"areaName" gorm:"column:area_name; type:varchar(255)" validate:"required"`
	ChannelName  string    `json:"channelName" gorm:"column:channel_name; type:varchar(255)" validate:"required"`
	SignalStatus int       `json:"signalStatus" gorm:"column:signal_status; type:int; default:0" validate:"required"` // 直播资源信号状态 0-正常  1-异常
	PreviewUrl   string    `json:"previewUrl" gorm:"column:preview_url; type:text"`
	CreateTime   time.Time `json:"-" gorm:"column:create_time; autoCreateTime"`
	UpdateTime   time.Time `json:"-" gorm:"column:update_time; autoUpdateTime"`
}

// 数据表
func (*LiveResource) TableName() string {
	return "live_resource"
}
